package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "charge_detail")//缴费详情管理表
public class ChargeDetail extends BaseModel{
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    @IsAutoIncrement   //自增
    @IsKey             //actable主键注解
    @Column(comment = "缴费详情记录ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;

    @Column(comment = "业主ID")
    @TableField("owner_id")
    private Long ownerId;
    @Column(comment = "所属小区ID")
    @TableField("community_id")
    private Long communityId;
    @Column(comment = "房屋ID")
    @TableField("house_id")
    private Long houseId;
    @Column(comment = "收费项目ID")
    @TableField("charge_id")
    private Long chargeId;
    @Column(comment = "负责收费的物业id")
    @TableField("property_staff_id")
    private Long propertyStaffId;
    @Column(comment = "用量")
    private Double dosage;
    @Column(comment = "总金额")
    private Double amount;
    @Column(comment = "费用所属月份")
    @TableField("fee_month")
    private Integer feeMonth;
    @Column(comment = "缴费状态，如未缴费、已缴费")
    @TableField("payment_status")
    private int paymentStatus;
    @Column(comment = "订单产生时间")
    @TableField("create_date")
    private String createDate;
    @Column(comment = "缴费时间，未缴费时为 null")
    @TableField("payment_date")
    private String paymentDate;
    @Column(comment = "订单号")
    @TableField("trace_no")
    private String traceNo;
    @Column(comment = "支付宝交易凭证号")
    @TableField("alipay_trace_no")
    private String alipayTraceNo;
}
